package br.com.management.mentor.view;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Text;

public class ProductView {

//	public Shell shell = null;
//	private Label msg = null;
	private Text text;
	private Text text_1;
	private Text text_2;
	private Text text_3;
	private Text text_4;
	private List list1;
	private List list2;
	private Text text_7;
	private Text text_8;

	public ProductView(Composite shell) {
		
		// display = Display.getDefault();
		
//		shell = new Shell(display, SWT.CLOSE );
//		shell.setSize(693, 346);
		Label lblNewLabel = new Label(shell, SWT.NONE);
		lblNewLabel.setBounds(41, 25, 88, 17);
		lblNewLabel.setText("Descrição");
		
		Label lblNewLabel_1 = new Label(shell, SWT.NONE);
		lblNewLabel_1.setBounds(10, 65, 107, 17);
		lblNewLabel_1.setText("Preço Compra");
		
		text = new Text(shell, SWT.BORDER);
		text.setBounds(111, 20, 344, 27);
		
		text_1 = new Text(shell, SWT.BORDER);
		text_1.setBounds(111, 60, 75, 27);
		
		Label lblPreoVenda = new Label(shell, SWT.NONE);
		lblPreoVenda.setBounds(191, 65, 107, 17);
		lblPreoVenda.setText("Preço Venda");
		
		text_2 = new Text(shell, SWT.BORDER);
		text_2.setBounds(280, 60, 75, 27);
		
		Label lblUnidade = new Label(shell, SWT.NONE);
		lblUnidade.setBounds(461, 25, 70, 17);
		lblUnidade.setText("Unidade");
		
		Combo combo = new Combo(shell, SWT.NONE);
		combo.setBounds(523, 20, 160, 29);
		
		Label lblEstoqueMin = new Label(shell, SWT.NONE);
		lblEstoqueMin.setBounds(361, 65, 88, 17);
		lblEstoqueMin.setText("Estoque Min.");
		
		text_3 = new Text(shell, SWT.BORDER);
		text_3.setBounds(450, 60, 70, 27);
		
		Label lblEstoqueMax = new Label(shell, SWT.NONE);
		lblEstoqueMax.setBounds(523, 65, 91, 17);
		lblEstoqueMax.setText("Estoque Max.");
		
		text_4 = new Text(shell, SWT.BORDER);
		text_4.setBounds(613, 60, 70, 27);
		
		Label lblFabricante = new Label(shell, SWT.NONE);
		lblFabricante.setBounds(36, 105, 81, 17);
		lblFabricante.setText("Fabricante");
		
		list1 = new List(shell, SWT.BORDER);
		list1.setBounds(111, 100, 170, 27);
		
		Label lblMarca = new Label(shell, SWT.CENTER);
		lblMarca.setBounds(287, 105, 63, 17);
		lblMarca.setText("Marca");
		
		list2 = new List(shell, SWT.BORDER);
		list2.setBounds(353, 100, 167, 27);
		
		Label lblCategoria = new Label(shell, SWT.NONE);
		lblCategoria.setBounds(523, 105, 70, 17);
		lblCategoria.setText("Categoria");
		
		List list3 = new List(shell, SWT.BORDER);
		list3.setBounds(592, 100, 91, 27);
		
		Label lblCdBarras = new Label(shell, SWT.NONE);
		lblCdBarras.setAlignment(SWT.RIGHT);
		lblCdBarras.setBounds(18, 145, 88, 17);
		lblCdBarras.setText("Cód. Barras");
		
		text_7 = new Text(shell, SWT.BORDER);
		text_7.setBounds(111, 140, 170, 27);
		
		Label lblObs = new Label(shell, SWT.NONE);
		lblObs.setAlignment(SWT.CENTER);
		lblObs.setBounds(285, 145, 70, 17);
		lblObs.setText("Obs.");
		
		text_8 = new Text(shell, SWT.BORDER);
		text_8.setBounds(353, 140, 330, 93);
		
		Button btnCadastrar = new Button(shell, SWT.NONE);
		btnCadastrar.setBounds(165, 257, 135, 29);
		btnCadastrar.setText("Cadastrar");
		
		Button btnLimpar = new Button(shell, SWT.NONE);
		btnLimpar.setBounds(315, 257, 135, 29);
		btnLimpar.setText("Limpar");
//		GridLayout gl_shell = new GridLayout(1, false);
//		shell.setLayout(gl_shell);
//		msg = new Label(shell, SWT.CENTER);
//		msg.setText("Tela de Produto em implementação");
//
//		Label linha = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
//		linha.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
//		linha.setText("TESTE");
		
//		Text text=new Text(buildViewContainer(shell),1 );
//		text.set
		
//		Button aumenta = new Button(shell, SWT.PUSH);
//		aumenta.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
//		aumenta.setText("Cadastrar");

//		shell.pack();
//		shell.open();
	}
}